package com.fusetech.flow.audit.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fusetech.flow.audit.domain.CurrentAuditNode;
import com.fusetech.flow.audit.service.dto.CurrentAuditNodeDTO;
import org.apache.ibatis.annotations.Param;


/**
 * 当前审核表MAPPER接口
 * @author Liuwq
 * @version 2023-05-10
 */
public interface CurrentAuditNodeMapper extends BaseMapper<CurrentAuditNode> {

    /**
     * 根据id获取当前审核表
     * @param id
     * @return
     */
    CurrentAuditNodeDTO findById(String id);

    /**
     * 获取当前审核表列表
     *
     * @param queryWrapper
     * @return
     */
    IPage <CurrentAuditNodeDTO> findList(Page <CurrentAuditNodeDTO> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);

    /**
     * 现在统计数据
     *
     * @param queryWrapper 查询包装
     * @return {@link Long}
     */
    Long countNowData(@Param(Constants.WRAPPER) QueryWrapper queryWrapper);
}
